<?php



class views_handler_quail_server_total_severe extends views_handler_field {
	
		function render($values) {
			return db_result(db_query('SELECT sum(t.severe_total) as severe '.
										'FROM accessible_content_node_totals t '.
										'LEFT JOIN quail_server_webpage w ON w.nid = t.nid '.
										'AND w.vid = t.vid '.
										'RIGHT JOIN node n ON n.nid = t.nid AND n.vid = t.vid '.
										'WHERE w.website_nid = %d', $values->nid));
		}
		
		function query() {
		
		}
}